/*
 * @Description: 路由后置钩子
 * @Autor: HuiSir<273250950@qq.com>
 * @Date: 2021-09-20 18:59:01
 * @LastEditTime: 2023-03-31 09:36:49
 */
import { TITLE } from "settings/script";
import { NavigationHookAfter } from "vue-router";
import myLoading from "@/helper/Loading";

const Hook: NavigationHookAfter = (to) => {
  // 更改Tab标题
  to.meta.title && (document.title = to.meta.title + " - " + TITLE);
  // 关闭loading
  myLoading.hide();
};

export default Hook;
